package com.tsing.cedap.rest.mapper;

import com.tsing.cedap.rest.entity.CollegeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tsing.cedap.rest.vo.respVo.CollegeRespVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 学院表 Mapper 接口
 * </p>
 *
 * @author TheTsing
 * @since 2022-01-26
 */
public interface CollegeMapper extends BaseMapper<CollegeEntity> {

    @Select("select c.*,ca.*\n" +
            "from cedap_college c\n" +
            "inner join cedap_campus ca on c.campus_id=ca.id where c.id=#{code}")
    CollegeRespVo getCollege(@Param("code") String code);

}
